From 51e8fed854fd9d373bb9b20d7ed8e7cf6ef12312 Mon Sep 17 00:00:00 2001
From: Adam Duskett <adam.duskett@amarulasolutions.com>
Date: Wed, 19 Jul 2023 11:48:59 -0700
Subject: [PATCH] pkg-config.py: do not prepend sysroot path

Buildroot uses the standard PKG_CONFIG_SYSROOT_DIR variable, so what the
pkg-config.py script is doing doesn't make sense. There is no need to prepend
the sysroot, and flutter should let pkg-config use the PKG_CONFIG_SYSROOT_DIR
variable.

Without this patch, the pkg-config.py script double prepends the sysroot path.
IE: output/host/.../sysroot/output/host/.../sysroot

Upstream: https://github.com/flutter/flutter/issues/132152
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
 build/config/linux/pkg-config.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/build/config/linux/pkg-config.py b/build/config/linux/pkg-config.py
index b4a6aff17..44ffdcaea 100644
--- a/build/config/linux/pkg-config.py
+++ b/build/config/linux/pkg-config.py
@@ -207,9 +207,7 @@ def main():
   all_flags = flag_string.strip().split(' ')
 
 
-  sysroot = options.sysroot
-  if not sysroot:
-    sysroot = ''
+  sysroot = ''
 
   includes = []
   cflags = []
-- 
2.41.0

